package co.baiku.boot;

import co.baiku.boot.generator.AJavaerGenerator;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

import javax.annotation.Resource;
import java.io.File;

@SpringBootApplication
@EnableJpaRepositories
public class Start implements CommandLineRunner {
    @Resource
    AJavaerGenerator aJavaerGenerator;

    public static void main(String[] args) {
        new SpringApplicationBuilder(Start.class).web(WebApplicationType.NONE).run(args);
    }

    @Override
    public void run(String... args) throws Exception {
        aJavaerGenerator.fromExcel(new File("D:\\baiku-bbs.xlsx"));
//        aJavaerGenerator.fromMysql();
    }
}
